package com.gopay.gass.dao.impl;

import com.gopay.gass.base.dao.impl.BaseDAOImpl;
import com.gopay.gass.dao.GassMainOrderDao;
import com.gopay.gass.domain.GassMainOrder;
import com.gopay.gass.util.DateUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Repository;

import java.io.Serializable;

/**
 * Created by HJY on 2015/3/20.
 */
@Repository("gassMainOrderDao")
public class GassMainOrderDaoImpl extends BaseDAOImpl<GassMainOrder,Serializable> implements GassMainOrderDao {

    public String getNextId() {
        String gassId = super.getNextId("GASS_ID_SEQ");
        gassId = DateUtils.getCurrDate("yyyyMMdd") + StringUtils.leftPad(gassId, 8, "0");
        return gassId;
    }
}
